#pragma GCC optimize(2)
#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <map>
#include <vector>

using namespace std;
using LL = long long;

int main(){
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    
    int T;
    cin >> T;
    int a, b, c;
    while(T--){
        cin >> a >> b >> c;
        int x1 = a;
        int x2 = 0;
        if(c > b){
            x2 = 2 * c - b;
        }else{
            x2 = b;
        }

        if(x1 > x2){
            cout << 2 << '\n';
        }else if(x1 < x2){
            cout << 1 << '\n';
        }else{
            cout << 3 << '\n';
        }
    }

    return 0;
}